import { resolve } from 'path';
import { defineConfig, loadEnv  } from 'vite';
import react from '@vitejs/plugin-react';

export default defineConfig(({ command, mode, ssrBuild }) => {
  const env = loadEnv(mode, process.cwd());
  console.log('env', env);
  
  return {
    plugins: [react()],
    resolve: {
      alias: {
        '@': resolve(__dirname, './src')
      }
    },
    base: env.VITE_PUBLIC_PATH,
  }
})
